package cn.yuanqiao.archive.management.domain;

import cn.yuanqiao.common.annotation.Excel;
import cn.yuanqiao.common.exception.ServiceException;
import cn.yuanqiao.common.utils.StringUtils;
import cn.yuanqiao.common.core.domain.BaseEntity;
import cn.yuanqiao.common.utils.SecurityUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 组盘明细对象 YQZPMX
 * 
 * @author sy
 * @date 2023-07-12
 */
public class YqZpmx extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    private final String BIGTABLENAME = "_YQZPMX";

    public YqZpmx() {
        String userCode = SecurityUtils.getTenantCode();
        if(StringUtils.isEmpty(userCode)){
            throw new ServiceException("TenantCode is null");
//            this.tableName = "YQZPMX";
        }else {
            this.tableName = userCode.toUpperCase()+BIGTABLENAME;
//            this.tableName = "YQZPMX";
        }
    }

    private String tableName;

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    /** 组盘记录ID */
    @Excel(name = "组盘记录ID")
    private Long zpjlId;

    /** 门类ID */
    @Excel(name = "门类ID")
    private Long categoryId;

    /** 门类名称 */
    @Excel(name = "门类名称")
    private String categoryName;

    /** 分表表名 */
    @Excel(name = "分表表名")
    private String subTableName;

    /** 档案ID */
    @Excel(name = "档案ID")
    private Long daId;

    /** 档号 */
    @Excel(name = "档号")
    private String dh;

    /** 封装包相对位置 */
    @Excel(name = "封装包相对位置")
    private String path;

    /** 封装包大小 */
    @Excel(name = "封装包大小")
    private String docFileSize;

    /** 格式转换后的封装包大小 */
    private String docFileSizeConvert;

    /** 封装包绝对位置 */
    @Excel(name = "封装包绝对位置")
    private String docMnt;

    public void setZpjlId(Long zpjlId) 
    {
        this.zpjlId = zpjlId;
    }

    public Long getZpjlId() 
    {
        return zpjlId;
    }
    public void setCategoryId(Long categoryId) 
    {
        this.categoryId = categoryId;
    }

    public Long getCategoryId() 
    {
        return categoryId;
    }
    public void setCategoryName(String categoryName) 
    {
        this.categoryName = categoryName;
    }

    public String getCategoryName() 
    {
        return categoryName;
    }
    public void setSubTableName(String subTableName) 
    {
        this.subTableName = subTableName;
    }

    public String getSubTableName() 
    {
        return subTableName;
    }
    public void setDaId(Long daId) 
    {
        this.daId = daId;
    }

    public Long getDaId() 
    {
        return daId;
    }

    public String getDh() {
        return dh;
    }

    public void setDh(String dh) {
        this.dh = dh;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public void setDocFileSize(String docFileSize)
    {
        this.docFileSize = docFileSize;
    }

    public String getDocFileSize() 
    {
        return docFileSize;
    }
    public void setDocMnt(String docMnt) 
    {
        this.docMnt = docMnt;
    }

    public String getDocMnt() 
    {
        return docMnt;
    }

    public String getDocFileSizeConvert() {
        return docFileSizeConvert;
    }

    public void setDocFileSizeConvert(String docFileSizeConvert) {
        this.docFileSizeConvert = docFileSizeConvert;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("zpjlId", getZpjlId())
            .append("categoryId", getCategoryId())
            .append("categoryName", getCategoryName())
            .append("subTableName", getSubTableName())
            .append("daId", getDaId())
            .append("dh", getDh())
            .append("path", getPath())
            .append("docFileSize", getDocFileSize())
            .append("docMnt", getDocMnt())
            .toString();
    }
}
